﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ManageBanking.Models;

namespace ManageBanking.Controllers
{
    public class NewsController : Controller
    {
        //
        // GET: /News/
        private NewsModels nm = new NewsModels();

        public ActionResult DetailNews(int id)
        {
            ViewData["menutopvalue"] = "News";
            ViewData["detailnews"] = nm.DetailNews(id);
            ViewData["otherNews"] = nm.OtherNews(id);
            return View();
        }

        public ActionResult ListNews()
        {
            ViewData["menutopvalue"] = "News";
            ViewData["listnews"] = nm.ListNews();
            return View();
        }

    }
}
